<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>自定义Spring Security登录页面</title>
    <link rel="stylesheet" type="text/css" href="/css/test.css">
    <script type="text/javascript" src="/js/my.js"></script>
</head>
<body>
    <div style="width: 800px; margin: auto; text-align: center">
        <!-- Spring Security 处理登录请求的方式一定是POST -->
        <form action="/login" method="post">
            <span th:if="${loginFail} == 'T'" style="color: red">用户名或密码错误</span>
            <table border="1" cellspacing="0" width="100%">
                <tr>
                    <td style="width: 30%; text-align: right; padding-right: 5px">
                        用户名：
                    </td>
                    <td style="padding-left: 5px; text-align: left;">
                        <input name="username" type="text"/>
                    </td>
                </tr>
                <tr>
                    <td style="width: 30%; text-align: right; padding-right: 5px">
                        密码：
                    </td>
                    <td style="padding-left: 5px; text-align: left">
                        <input name="password" type="text"/>
                    </td>
                </tr>
                <tr>
                    <td style="width: 30%; text-align: right; padding-right: 5px">
                        记住我：
                    </td>
                    <td style="padding-left: 5px; text-align: left">
                        <input name="remember-me" type="checkbox" checked="checked"/>
                    </td>
                </tr>
                <tr>
                   <td colspan="2" style="text-align: center">
                       <input type="submit" value="登录"/>
                   </td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>